package com.bootdo.system.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bootdo.system.dao.CustomerQrCodeMapper;
import com.bootdo.system.domain.CustomerQrCode;
import com.bootdo.system.service.CustomerQrCodeService;
import com.bootdo.system.service.BabyService;
import com.github.pagehelper.PageHelper;



@Service("customerQrCodeService")
public class CustomerQrCodeServiceImpl implements CustomerQrCodeService {
	@Autowired
	private CustomerQrCodeMapper customerQrCodeMapper;
	
	@Override
	public CustomerQrCode get(Long id){
		return customerQrCodeMapper.get(id);
	}
	
	@Override
	public CustomerQrCode getByCustomerId(Long customerId){
		return customerQrCodeMapper.getByCustomerId(customerId);
	}
	
	@Override
	public List<CustomerQrCode> list(Map<String, Object> map){
		PageHelper.startPage(Integer.parseInt(map.get("pageNum").toString()),Integer.parseInt(map.get("pageSize").toString()));
		return customerQrCodeMapper.list(map);
	}
	
	@Override
	public int save(CustomerQrCode bComments){
		return customerQrCodeMapper.save(bComments);
	}
	
	@Override
	public int update(CustomerQrCode bComments){
		return customerQrCodeMapper.update(bComments);
	}
	
	@Override
	public int remove(Long id){
		return customerQrCodeMapper.remove(id);
	}
	
	
	@Override
	public int removeByCustomerId(Long customerId){
		return customerQrCodeMapper.removeByCustomerId(customerId);
	}
	
	
	@Override
	public int batchRemove( Integer[] ids){
		return customerQrCodeMapper.batchRemove(ids);
	}

}
